<HTML><HEAD><TITLE>option(++Option, ++On_or_Off)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ech)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>option(++Option, ++On_or_Off)</H1>
Specify options for controlling ech compilation
<DL>
<DT><EM>Option</EM></DT>
<DD>Option Name (Atom)
</DD>
<DT><EM>On_or_Off</EM></DT>
<DD>If Option should be on ('on') or off ('off'), or an integer between 1 and 11
</DD>
</DL>
<H2>Description</H2>
   Allows the user to set options that affect the way the CHRs are compiled.
   These options can be turned on or off, with the default state being on.
   The options controls if certain run-time safety checks are performed or
   not. With the option off, the associated safety check will not be generated
   for the CHR code when compiled. Such code can run more efficiently, but
   can lead to incorrect behaviour that the checks would have been able to
   prevent.
   
<DL>
     <DT>check_guard_bindings
          <DD> When executing a guard in a CHR rule, checks are performed
          so that if a guard goal attemps to touch a global variable (i.e. a
          variable which occurs in the rule head), the guard will fail. With
          this option set to `off', then the checks are not performed.

     <DT>already_in_store
          <DD> Before adding a user-defined CHR constraint to the constraint
          store, a check is performed to see if the particular constraint
          (i.e. with exactly the same variables) is already in the store.
          If this option is set to `off', then the check is not performed.
          The user can explicitly check if a constraint is in store by the
          in_chrstore/1 predicate.

     <DT>chr_priority
          <DD> On_or_Off is an integer between 1 and 11, specifying the
          default priority for CHR constraints generated by the compiler.
          It also specifies the priority that at_lower/at_higher
          declarations will be calculated from in the constraints/1
          declarations. Note that all priorities are determined at the
          point of the constraint declaration and is not affected by any
          subsequent changes in chr_priority.

</DL>

<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).

</BODY></HTML>
